<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>The XMLReader class</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="xmlreader.resources.html">« 资源类型</a></li>
      <li style="float: right;"><a href="xmlreader.close.html">XMLReader::close »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="book.xmlreader.html">XMLReader</a></li>
    <li>The XMLReader class</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="class.xmlreader" class="reference">
 <h1 class="title">The XMLReader class</h1>
 
 
 <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.1.0, PHP 7, PHP 8)</p>
 

  <div class="section" id="xmlreader.intro">
   <h2 class="title">简介</h2>
   <p class="para">
    The XMLReader extension is an XML Pull parser. The reader acts as a 
    cursor going forward on the document stream and stopping at each node 
    on the way.
   </p>
  </div>

 
  <div class="section" id="xmlreader.synopsis">
   <h2 class="title">类摘要</h2>
 

   <div class="classsynopsis">
    <div class="ooclass">
     
    </div>

    <div class="classsynopsisinfo">
     <span class="ooclass">
      <span class="modifier">class</span> <strong class="classname">XMLReader</strong>
     </span>
     {</div>

    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 常量 */</div>
    <div class="fieldsynopsis">
     <span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.none"><var class="varname">NONE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.element"><var class="varname">ELEMENT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.attribute"><var class="varname">ATTRIBUTE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.text"><var class="varname">TEXT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.cdata"><var class="varname">CDATA</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.entity-ref"><var class="varname">ENTITY_REF</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.entity"><var class="varname">ENTITY</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.pi"><var class="varname">PI</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.comment"><var class="varname">COMMENT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.doc"><var class="varname">DOC</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.doc-type"><var class="varname">DOC_TYPE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.doc-fragment"><var class="varname">DOC_FRAGMENT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.notation"><var class="varname">NOTATION</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.whitespace"><var class="varname">WHITESPACE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.significant-whitespace"><var class="varname">SIGNIFICANT_WHITESPACE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.end-element"><var class="varname">END_ELEMENT</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.end-entity"><var class="varname">END_ENTITY</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.xml-declaration"><var class="varname">XML_DECLARATION</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.loaddtd"><var class="varname">LOADDTD</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.defaultattrs"><var class="varname">DEFAULTATTRS</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.validate"><var class="varname">VALIDATE</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="modifier">const</span>
     <span class="type">int</span>
      <var class="fieldsynopsis_varname"><a href="class.xmlreader.html#xmlreader.constants.subst-entities"><var class="varname">SUBST_ENTITIES</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 属性 */</div>
    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.attributecount">$<var class="varname">attributeCount</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.baseuri">$<var class="varname">baseURI</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.depth">$<var class="varname">depth</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">bool</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.hasattributes">$<var class="varname">hasAttributes</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">bool</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.hasvalue">$<var class="varname">hasValue</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">bool</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.isdefault">$<var class="varname">isDefault</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">bool</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.isemptyelement">$<var class="varname">isEmptyElement</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.localname">$<var class="varname">localName</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.name">$<var class="varname">name</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.namespaceuri">$<var class="varname">namespaceURI</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">int</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.nodetype">$<var class="varname">nodeType</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.prefix">$<var class="varname">prefix</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.value">$<var class="varname">value</var></a></var>;</div>

    <div class="fieldsynopsis"><span class="modifier">public</span>
     <span class="type">string</span>
      <var class="varname"><a href="class.xmlreader.html#xmlreader.props.xmllang">$<var class="varname">xmlLang</var></a></var>;</div>


    <div class="classsynopsisinfo classsynopsisinfo_comment">/* 方法 */</div>
    <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><a href="xmlreader.close.html" class="methodname">close</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.expand.html" class="methodname">expand</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span><span class="type"></span></span> <code class="parameter">$baseNode</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type"><span class="type"><a href="class.domnode.html" class="type DOMNode">DOMNode</a></span>|<span class="type"><span class="type false">false</span></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.getattribute.html" class="methodname">getAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.getattributeno.html" class="methodname">getAttributeNo</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.getattributens.html" class="methodname">getAttributeNs</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$namespace</code></span>): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.getparserproperty.html" class="methodname">getParserProperty</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$property</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.isvalid.html" class="methodname">isValid</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.lookupnamespace.html" class="methodname">lookupNamespace</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$prefix</code></span>): <span class="type"><span class="type">?</span><span class="type">string</span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="xmlreader.movetoattribute.html" class="methodname">moveToAttribute</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="xmlreader.movetoattributeno.html" class="methodname">moveToAttributeNo</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$index</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.movetoattributens.html" class="methodname">moveToAttributeNs</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$name</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$namespace</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.movetoelement.html" class="methodname">moveToElement</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.movetofirstattribute.html" class="methodname">moveToFirstAttribute</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.movetonextattribute.html" class="methodname">moveToNextAttribute</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.next.html" class="methodname">next</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$name</code><span class="initializer"> = <strong><code>null</code></strong></span></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="xmlreader.open.html" class="methodname">open</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$uri</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$encoding</code><span class="initializer"> = <strong><code>null</code></strong></span></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type">bool</span>|<span class="type"><a href="class.xmlreader.html" class="type XMLReader">XMLReader</a></span></span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.read.html" class="methodname">read</a></span>(): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.readinnerxml.html" class="methodname">readInnerXml</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.readouterxml.html" class="methodname">readOuterXml</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.readstring.html" class="methodname">readString</a></span>(): <span class="type">string</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span>
   <span class="methodname"><a href="xmlreader.setparserproperty.html" class="methodname">setParserProperty</a></span>(<span class="methodparam"><span class="type">int</span> <code class="parameter">$property</code></span>, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$value</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.setrelaxngschema.html" class="methodname">setRelaxNGSchema</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$filename</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.setrelaxngschemasource.html" class="methodname">setRelaxNGSchemaSource</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$source</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="methodname"><a href="xmlreader.setschema.html" class="methodname">setSchema</a></span>(<span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$filename</code></span>): <span class="type">bool</span></div>
<div class="methodsynopsis dc-description"><span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><a href="xmlreader.xml.html" class="methodname">XML</a></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$source</code></span>, <span class="methodparam"><span class="type">?</span><span class="type"><span class="type">string</span><span class="type"></span></span> <code class="parameter">$encoding</code><span class="initializer"> = <strong><code>null</code></strong></span></span>, <span class="methodparam"><span class="type">int</span> <code class="parameter">$flags</code><span class="initializer"> = 0</span></span>): <span class="type"><span class="type">bool</span>|<span class="type"><a href="class.xmlreader.html" class="type XMLReader">XMLReader</a></span></span></div>

   }</div>

 
  </div>
 

  <div class="section" id="xmlreader.props">
   <h2 class="title">属性</h2>
   <dl>
    
     <dt id="xmlreader.props.attributecount"><var class="varname">attributeCount</var></dt>

     <dd>

      <p class="para">
       The number of attributes on the node
      </p>
     </dd>

    

    
     <dt id="xmlreader.props.baseuri"><var class="varname">baseURI</var></dt>

     <dd>

      <p class="para">The base URI of the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.depth"><var class="varname">depth</var></dt>

     <dd>

      <p class="para">Depth of the node in the tree, starting at 0</p>
     </dd>

    

    
     <dt id="xmlreader.props.hasattributes"><var class="varname">hasAttributes</var></dt>

     <dd>

      <p class="para">Indicates if node has attributes</p>
     </dd>

    

    
     <dt id="xmlreader.props.hasvalue"><var class="varname">hasValue</var></dt>

     <dd>

      <p class="para">Indicates if node has a text value</p>
     </dd>

    

    
     <dt id="xmlreader.props.isdefault"><var class="varname">isDefault</var></dt>

     <dd>

      <p class="para">Indicates if attribute is defaulted from DTD</p>
     </dd>

    

    
     <dt id="xmlreader.props.isemptyelement"><var class="varname">isEmptyElement</var></dt>

     <dd>

       <p class="para">Indicates if node is an empty element tag</p>
     </dd>

    

    
     <dt id="xmlreader.props.localname"><var class="varname">localName</var></dt>

     <dd>

      <p class="para">The local name of the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.name"><var class="varname">name</var></dt>

     <dd>

      <p class="para">The qualified name of the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.namespaceuri"><var class="varname">namespaceURI</var></dt>

     <dd>

      <p class="para">The URI of the namespace associated with the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.nodetype"><var class="varname">nodeType</var></dt>

     <dd>

      <p class="para">The node type for the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.prefix"><var class="varname">prefix</var></dt>

     <dd>

      <p class="para">The prefix of the namespace associated with the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.value"><var class="varname">value</var></dt>

     <dd>

      <p class="para">The text value of the node</p>
     </dd>

    

    
     <dt id="xmlreader.props.xmllang"><var class="varname">xmlLang</var></dt>

     <dd>

      <p class="para">The xml:lang scope which the node resides</p>
     </dd>

    

   </dl>

  </div>

 
  
  <div class="section" id="xmlreader.constants">
   <h2 class="title">预定义常量</h2>
   <div class="section" id="xmlreader.constants.types">
    <h2 class="title">XMLReader Node Types</h2>
    <dl>

     
      <dt id="xmlreader.constants.none"><strong><code>XMLReader::NONE</code></strong></dt>

      <dd>

       <p class="para">No node type</p>
      </dd>

     

     
      <dt id="xmlreader.constants.element"><strong><code>XMLReader::ELEMENT</code></strong></dt>

      <dd>

       <p class="para">Start element</p>
      </dd>

     

     
      <dt id="xmlreader.constants.attribute"><strong><code>XMLReader::ATTRIBUTE</code></strong></dt>

      <dd>

       <p class="para">Attribute node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.text"><strong><code>XMLReader::TEXT</code></strong></dt>

      <dd>

       <p class="para">Text node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.cdata"><strong><code>XMLReader::CDATA</code></strong></dt>

      <dd>

       <p class="para">CDATA node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.entity-ref"><strong><code>XMLReader::ENTITY_REF</code></strong></dt>

      <dd>

       <p class="para">Entity Reference node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.entity"><strong><code>XMLReader::ENTITY</code></strong></dt>

      <dd>

       <p class="para">Entity Declaration node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.pi"><strong><code>XMLReader::PI</code></strong></dt>

      <dd>

       <p class="para">Processing Instruction node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.comment"><strong><code>XMLReader::COMMENT</code></strong></dt>

      <dd>

       <p class="para">Comment node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.doc"><strong><code>XMLReader::DOC</code></strong></dt>

      <dd>

       <p class="para">Document node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.doc-type"><strong><code>XMLReader::DOC_TYPE</code></strong></dt>

      <dd>

       <p class="para">Document Type node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.doc-fragment"><strong><code>XMLReader::DOC_FRAGMENT</code></strong></dt>

      <dd>

       <p class="para">Document Fragment node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.notation"><strong><code>XMLReader::NOTATION</code></strong></dt>

      <dd>

       <p class="para">Notation node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.whitespace"><strong><code>XMLReader::WHITESPACE</code></strong></dt>

      <dd>

       <p class="para">Whitespace node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.significant-whitespace"><strong><code>XMLReader::SIGNIFICANT_WHITESPACE</code></strong></dt>

      <dd>

       <p class="para">Significant Whitespace node</p>
      </dd>

     

     
      <dt id="xmlreader.constants.end-element"><strong><code>XMLReader::END_ELEMENT</code></strong></dt>

      <dd>

       <p class="para">End Element</p>
      </dd>

     

     
      <dt id="xmlreader.constants.end-entity"><strong><code>XMLReader::END_ENTITY</code></strong></dt>

      <dd>

       <p class="para">End Entity</p>
      </dd>

     

     
      <dt id="xmlreader.constants.xml-declaration"><strong><code>XMLReader::XML_DECLARATION</code></strong></dt>

      <dd>

       <p class="para">XML Declaration node</p>
      </dd>

     

    </dl>

   </div>

   <div class="section" id="xmlreader.constants.options">
    <h2 class="title">XMLReader Parser Options</h2>

    <dl>

     
      <dt id="xmlreader.constants.loaddtd"><strong><code>XMLReader::LOADDTD</code></strong></dt>

      <dd>

       <p class="para">Load DTD but do not validate</p>
      </dd>

     

     
      <dt id="xmlreader.constants.defaultattrs"><strong><code>XMLReader::DEFAULTATTRS</code></strong></dt>

      <dd>

       <p class="para">Load DTD and default attributes but do not validate</p>
      </dd>

     

     
      <dt id="xmlreader.constants.validate"><strong><code>XMLReader::VALIDATE</code></strong></dt>

      <dd>

       <p class="para">Load DTD and validate while parsing</p>
      </dd>

     

     
      <dt id="xmlreader.constants.subst-entities"><strong><code>XMLReader::SUBST_ENTITIES</code></strong></dt>

      <dd>

       <p class="para">Substitute entities and expand references</p>
      </dd>

     

    </dl>

   </div>
  </div>

 </div>
 
 

































































































 







 







 































 
<h2>目录</h2><ul class="chunklist chunklist_reference"><li><a href="xmlreader.close.html">XMLReader::close</a> — Close the XMLReader input</li><li><a href="xmlreader.expand.html">XMLReader::expand</a> — Returns a copy of the current node as a DOM object</li><li><a href="xmlreader.getattribute.html">XMLReader::getAttribute</a> — Get the value of a named attribute</li><li><a href="xmlreader.getattributeno.html">XMLReader::getAttributeNo</a> — Get the value of an attribute by index</li><li><a href="xmlreader.getattributens.html">XMLReader::getAttributeNs</a> — Get the value of an attribute by localname and URI</li><li><a href="xmlreader.getparserproperty.html">XMLReader::getParserProperty</a> — Indicates if specified property has been set</li><li><a href="xmlreader.isvalid.html">XMLReader::isValid</a> — Indicates if the parsed document is valid</li><li><a href="xmlreader.lookupnamespace.html">XMLReader::lookupNamespace</a> — Lookup namespace for a prefix</li><li><a href="xmlreader.movetoattribute.html">XMLReader::moveToAttribute</a> — Move cursor to a named attribute</li><li><a href="xmlreader.movetoattributeno.html">XMLReader::moveToAttributeNo</a> — Move cursor to an attribute by index</li><li><a href="xmlreader.movetoattributens.html">XMLReader::moveToAttributeNs</a> — Move cursor to a named attribute</li><li><a href="xmlreader.movetoelement.html">XMLReader::moveToElement</a> — Position cursor on the parent Element of current Attribute</li><li><a href="xmlreader.movetofirstattribute.html">XMLReader::moveToFirstAttribute</a> — Position cursor on the first Attribute</li><li><a href="xmlreader.movetonextattribute.html">XMLReader::moveToNextAttribute</a> — Position cursor on the next Attribute</li><li><a href="xmlreader.next.html">XMLReader::next</a> — Move cursor to next node skipping all subtrees</li><li><a href="xmlreader.open.html">XMLReader::open</a> — Set the URI containing the XML to parse</li><li><a href="xmlreader.read.html">XMLReader::read</a> — Move to next node in document</li><li><a href="xmlreader.readinnerxml.html">XMLReader::readInnerXml</a> — Retrieve XML from current node</li><li><a href="xmlreader.readouterxml.html">XMLReader::readOuterXml</a> — Retrieve XML from current node, including itself</li><li><a href="xmlreader.readstring.html">XMLReader::readString</a> — Reads the contents of the current node as a string</li><li><a href="xmlreader.setparserproperty.html">XMLReader::setParserProperty</a> — Set parser options</li><li><a href="xmlreader.setrelaxngschema.html">XMLReader::setRelaxNGSchema</a> — Set the filename or URI for a RelaxNG Schema</li><li><a href="xmlreader.setrelaxngschemasource.html">XMLReader::setRelaxNGSchemaSource</a> — Set the data containing a RelaxNG Schema</li><li><a href="xmlreader.setschema.html">XMLReader::setSchema</a> — Validate document against XSD</li><li><a href="xmlreader.xml.html">XMLReader::XML</a> — Set the data containing the XML to parse</li></ul>
</div>
</div></div></body></html>